/**   
* @Title: OptionerFactory.java 
* @Package absfactory.Calculator 
* @Description: TODO(用一句话描述该文件做什么) 
* @author yangdechao   
* @date 2017-7-21 上午10:09:18 
* @version V1.0   
*/
package absfactory.Calculator;

/**
 * @author john
 *
 */
public class OptionerFactory {
	 public static Operation createOptioner(String opt) {
		 Operation optioner = null;
	        switch (opt) {
	            case "+":
	                optioner = new AddOptioner();
	                break;
	            case "-":
	                optioner = new SubOptioner();
	                break;
	            case "*":
	                optioner = new MulOptioner();
	                break;
	            case "/":
	                optioner = new DivOptioner();
	                break;
	        }
	        return optioner;
	    }
}
